function SiteVm(data, dispatcher)
{
    this.dispatcher = dispatcher;
    this.id = data.id;
    this.title = data.title;
    this.url = data.url;

    this.Sections = ko.observableArray([]);


}

SiteVm.prototype = {
    setSections: function(sections) {
        var self = this;
        var t = ko.utils.arrayFilter(sections, function(section) {
            return section.site_id === self.id;
        }, this);
        this.Sections(ko.utils.arrayMap(t, function(data){
            return new SectionVm(data);
        }));
    }
};
